package com.gxa.autoparts.admin.service.impl;

import com.gxa.autoparts.admin.mapper.RoleMapper;
import com.gxa.autoparts.admin.service.RoleService;
import com.gxa.autoparts.core.pojo.Role;
import com.gxa.autoparts.core.service.BaseService;
import com.gxa.autoparts.core.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("roleService")
public class RoleServiceImpl extends BaseServiceImpl<Role> implements RoleService {
    @Resource
    private RoleMapper roleMapper;

    @Override
    public Role selectRole(Long id) {
        return roleMapper.selectRole(id);
    }

    @Override
    public void delectByRid(Long id) {
        roleMapper.delectByRid(id);
    }

    @Override
    public List<Role> selectByDesc(String desc) {
        return roleMapper.selectByDesc(desc);
    }

    @Override
    public void insertRole(Role role) {
        roleMapper.insertRole(role);
    }

    @Override
    public Role selectByRole(Role role) {
        return roleMapper.selectByRole(role);
    }

    @Override
    public void updateRole(Role role) {
        roleMapper.updateRole(role);
    }

    @Override
    public List<Role> selectAllRole(Integer page, Integer size) {
        return roleMapper.selectAllRole(page, size);
    }

    @Override
    public List<Role> selectAllRole2() {
        return roleMapper.selectAllRole2();
    }
}
